
clear
use "[Data Folder]\ssyk12_isco08.dta"
sort ssyk_2012
collapse (mean) t* iti   , by(ssyk_2012)
rename ssyk_2012 KU1Ssyk4

//Non-routine, cognitive analytcal
gen nr_ca= t_4A2a4 + t_4A2b2 + t_4A4a1
sum nr_ca
replace nr_ca=(nr_ca-r(mean) )/ r(sd)
sum nr_ca

//Non-routine, cognitive niterpersonal
gen nr_ci= t_4A4a4 + t_4A4b4 + t_4A4b5
sum nr_ci
replace nr_ci=(nr_ci-r(mean) )/ r(sd)
sum nr_ci

//Routine cognitive
gen rc = t_4C3b7 + t_4C3b4 + t_4C3b8_rev
sum rc
replace rc=(rc-r(mean) )/ r(sd)
sum rc

//Routine, manual 
gen rm = t_4C3d3 + t_4A3a3 + t_4C2d1i
sum rm
replace rm=(rm-r(mean) )/ r(sd)
sum rm

//Non-routine, manual physical
gen nr_mp= t_4A3a4 + t_4C2d1g + t_1A2a2 + t_1A1f1
sum nr_mp
replace nr_mp=(nr_mp-r(mean) )/ r(sd)
sum nr_mp

save "[Data Folder]\ssyk12_isco08_up.dta", replace


clear
use "[Data Folder]\ssyk96_12_isco08.dta"
sort ssyk_96
collapse (mean) t* iti  , by(ssyk_96)
rename ssyk_96 KU1Ssyk4

//Non-routine, cognitive analytcal
gen nr_ca= t_4A2a4 + t_4A2b2 + t_4A4a1
sum nr_ca
replace nr_ca=(nr_ca-r(mean) )/ r(sd)
sum nr_ca

//Non-routine, cognitive niterpersonal
gen nr_ci= t_4A4a4 + t_4A4b4 + t_4A4b5
sum nr_ci
replace nr_ci=(nr_ci-r(mean) )/ r(sd)
sum nr_ci

//Routine cognitive
gen rc = t_4C3b7 + t_4C3b4 + t_4C3b8_rev
sum rc
replace rc=(rc-r(mean) )/ r(sd)
sum rc

//Routine, manual 
gen rm = t_4C3d3 + t_4A3a3 + t_4C2d1i
sum rm
replace rm=(rm-r(mean) )/ r(sd)
sum rm

//Non-routine, manual physical
gen nr_mp= t_4A3a4 + t_4C2d1g + t_1A2a2 + t_1A1f1
sum nr_mp
replace nr_mp=(nr_mp-r(mean) )/ r(sd)
sum nr_mp


save "[Data Folder]\ssyk96_isco08_up.dta", replace




